# 创建库
vlib work
#映射库
vmap work work
#编译库的源文件到库

vlog -work work freq.v +cover=bces
vlog -work work freq_dop.v +cover=bces
vlog -work work led.v +cover=bces
vlog -work work sim_db_fpga.v
vlog -work work sim_db_fpga_tb.v

# 启动仿真
vsim \
-coverage \
-voptargs=+acc \
+transport_int_delays \
+transport_path_delays \
+notimingchecks \
-t ns \
-noglitch \
-multisource_delay latest \
sim_db_fpga_tb

set NumericStdNoWarnings 1
set StdArithNoWarnings 1
onbreak { resume }

# 添加信号到波形
do wave.do
run -all